<?php
$lang = &JSFactory::getLang();
$tag = $lang->lang;
$db = &JFactory::getDBO();
$lines = file($extractdir."/demo.sql");
$fullline = implode(" ", $lines);
$queryes = $db->splitSql($fullline);            
foreach($queryes as $query){
    if (trim($query)!=''){
        $query = str_replace("en-GB", $tag, $query);
        $db->setQuery($query);
        $db->query();
        if ($db->getErrorNum()) {
            JError::raiseWarning( 500, $db->stderr() );
            saveToLog("error.log", "Update - ".$db->stderr());
        }
    }
}
?>